package com.example.time_slector

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.TimePicker
import android.widget.Toast

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val timePicker = findViewById<TimePicker>(R.id.time_picker)

        timePicker.setOnTimeChangedListener{ timePicker: TimePicker, hourOfDay: Int, minute: Int ->
            Toast.makeText(this,"$hourOfDay/$minute",Toast.LENGTH_SHORT).show()
        }

    }
}
